package observer.demo1;


/**
 * @author 1
 * @version 1.0
 * @description: TODO
 * @date 2024-08-26 16:22
 */
public class Client {
    public static void main(String[] args) {
        //被观察者们
        HanFeiZi hanFeiZi = new HanFeiZi();
        Lisi lisi = new Lisi();
        WangSi wangSi = new WangSi();
        hanFeiZi.addObserver(wangSi);
        hanFeiZi.addObserver(lisi);


        hanFeiZi.haveBreakfast();
        System.out.println("----------------");
        hanFeiZi.lookBook();
    }
}
